<?php
namespace BP\En;
require_once("java/util/ArrayList.php");
require_once("java/util/List.php");
class EnDtls extends ArrayList {
	protected static $serialVersionUID;	// long
	public static function __staticinit() { // static class members
		self::$serialVersionUID = 1;
	}
	public function IsContainKey ($className) // [String className]
	{
		foreach ($this->ToJavaList() as $ed) 		{
			if ($ed->getEnsName()->equals($className))
			{
				return  TRUE ;
			}
		}
		return  FALSE ;
	}
	public function Add ($en) // [EnDtl en]
	{
		if ($this->IsExits($en))
		{
			return ;
		}
		$this->add($en);
	}
	public function IsExits ($en) // [EnDtl en]
	{
		foreach ($this->ToJavaList() as $dtl) 		{
			if (($dtl->getEns() == $en->getEns()))
			{
				return  TRUE ;
			}
		}
		return  FALSE ;
	}
	public function GetEnDtlByKey ($key) // [String key]
	{
		foreach ($this->ToJavaList() as $dtl) 		{
			if ($dtl->getRefKey()->equals($key))
			{
				return $dtl;
			}
		}
		throw new \RuntimeException((("@没有找到 key=[" . $key) . "]的属性，请检查map文件�?"));
	}
	public function getItem ($index) // [int index]
	{
		return $this->get($index);
	}
	public function GetEnDtlByEnsName ($className) // [String className]
	{
		foreach ($this->ToJavaList() as $en) 		{
			if ($en->getEnsName()->equals($className))
			{
				return $en;
			}
		}
		throw new \RuntimeException(("@没有找到他的明细:" . $className));
	}
	public function ToJavaList () 
	{
		return $this;
	}
}
EnDtls::__staticinit(); // initialize static vars for this class on load
?>
